<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="author" content="esy">
    
    <meta name="description" content="esy">
    
    
    
    
    
    
    <title>面向对象版学员管理系统 | ESY</title>
    <link href="https://esyyes.github.io" rel="prefetch" />

    
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/aos.css">
<link rel="stylesheet" href="/css/style.css">

    
<script src="/js/jquery.min.js"></script>

    
<script src="/js/bootstrap.min.js"></script>

    
<script src="/js/aos.js"></script>

    
<script src="/js/highslide/highslide-full.min.js"></script>

    
<link rel="stylesheet" href="/js/highslide/highslide.css">

    <style type="text/css">
        @media (max-width: 768px) {
            body {
                background-color: #f0f0f0;
                background: url('/imgs/xsbg.gif');
                background-attachment: fixed;
            }
        }
    </style>
    
    <!--<script type="text/javascript">
      if (document.images) {
        var avatar = new Image();
        avatar.src = '/imgs/avatar.jpg'
        var previews = 'preview1.jpg,preview2.jpg,preview3.jpg,preview4.jpg'.split(',')
        var previewsPreLoad = []
        for(var i = 0; i < length; i++) {
          previewsPreLoad.push(new Image())
          previewsPreLoad[previewsPreLoad.length - 1].src = '/imgs/preview' + previews[i]
        }
      }
    </script>-->
<meta name="generator" content="Hexo 5.2.0"></head>
<body>
    <!-- 背景轮播图功能 -->
    <section class="hidden-xs">
    <ul class="cb-slideshow">
        <li><span>天若</span></li>
        <li><span>有情</span></li>
        <li><span>天亦老</span></li>
        <li><span>我为</span></li>
        <li><span>长者</span></li>
        <li><span>续一秒</span></li>
    </ul>
</section>
    <!-- 欧尼酱功能, 谁用谁知道 -->
    
    <div class="gal-menu gal-dropdown">
    <div class="circle" id="gal">
        <div class="ring">
            <a href="https://esyyes.github.io" class="menuItem" style="left: 50%; top: 15%;">首页</a>
            
            <a class="menuItem" style="left: 80.3109%; top: 32.5%;">下一页</a>
            
            <a href="/archives" class="menuItem" style="left: 80.3109%; top: 67.5%;">归档</a>
            <a href="/about" class="menuItem" style="left: 50%; top: 85%;">关于</a>
            <a href="/message" class="menuItem" style="left: 19.6891%; top: 67.5%;">留言板</a>

            
            <a class="menuItem" style="left: 19.6891%; top: 32.5%;">上一页</a>
            
        </div>
        <audio id="audio" src="/imgs/oni.mp3"></audio>
    </div>
</div>
    
    <header class="navbar navbar-inverse" id="gal-header">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed"
                    data-toggle="collapse" data-target=".bs-navbar-collapse"
                    aria-expanded="false">
                <span class="fa fa-lg fa-reorder"></span>
            </button>
            <a href="https://esyyes.github.io">
                
                <style>
                    #gal-header .navbar-brand {
                        height: 54px;
                        line-height: 24px;
                        font-size: 28px;
                        opacity: 1;
                        background-color: rgba(0,0,0,0);
                        text-shadow: 0 0 5px #fff,0 0 10px #fff,0 0 15px #fff,0 0 20px #228DFF,0 0 35px #228DFF,0 0 40px #228DFF,0 0 50px #228DFF,0 0 75px #228DFF;
                    }
                </style>
                <!-- 这里使用文字(navbar_text or config.title) -->
                <div class="navbar-brand">ESY</div>
                
            </a>
        </div>
        <div class="collapse navbar-collapse bs-navbar-collapse">
            <ul class="nav navbar-nav" id="menu-gal">
                
                
                <li class="">
                    <a href="/">
                        <i class="fa fa-home"></i>首页
                    </a>
                </li>
                
                
                
                <li class="">
                    <a href="/archives">
                        <i class="fa fa-archive"></i>归档
                    </a>
                </li>
                
                
                
                
                <li class="dropdown">
                    <!-- TODO 添加hover dropdown效果 -->
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false" data-hover="dropdown">
                        <i class="fa fa-list"></i>分类
                    </a>
                    <ul class="dropdown-menu">
                        
                        
                        <li>
                            <a href="/categories/py-study/">py_study</a>
                        </li>
                        
                        <li>
                            <a href="/categories/nlp/">nlp</a>
                        </li>
                        
                        <li>
                            <a href="/categories/Graduation-work/">Graduation work</a>
                        </li>
                        
                        <li>
                            <a href="/categories/work/">work</a>
                        </li>
                        
                        <li>
                            <a href="/categories/hexo/">hexo</a>
                        </li>
                        
                        <li>
                            <a href="/categories/hexo%E5%AE%8C%E5%96%84/">-hexo完善</a>
                        </li>
                        
                        
                        <li>
                            <a href="/categories">...</a>
                        </li>
                        
                        
                    </ul>
                </li>
                
                
                
                
                
                <li class="dropdown">
                    <!-- TODO 添加hover dropdown效果 -->
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false" data-hover="dropdown">
                        <i class="fa fa-tags"></i>标签
                    </a>
                    <ul class="dropdown-menu">
                        
                        
                        <li>
                            <a href="/tags/py-study/">py_study</a>
                        </li>
                        
                        <li>
                            <a href="/tags/nlp/">nlp</a>
                        </li>
                        
                        <li>
                            <a href="/tags/Graduation-work/">Graduation work</a>
                        </li>
                        
                        <li>
                            <a href="/tags/work/">work</a>
                        </li>
                        
                        <li>
                            <a href="/tags/hexo/">hexo</a>
                        </li>
                        
                        <li>
                            <a href="/tags/%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/">-个人博客搭建</a>
                        </li>
                        
                        
                        <li>
                            <a href="/tags">...</a>
                        </li>
                        
                        
                    </ul>
                </li>
                
                
                
                
                <li class="">
                    <a href="/about">
                        <i class="fa fa-user"></i>关于我
                    </a>
                </li>
                
                
            </ul>
        </div>
    </div>
</header>
    <div id="gal-body">
        <div class="container">
            <div class="row">
                <div class="col-md-8 gal-right" id="mainstay">
                    
<article class="article well article-body" id="article">
    <div class="breadcrumb">
        <i class="fa fa-home"></i>
        <a href="https://esyyes.github.io">ESY</a>
        >
        <span>面向对象版学员管理系统</span>
    </div>
    <!-- 大型设备详细文章 -->
    <div class="hidden-xs">
        <div class="title-article">
            <h1>
                <a href="/2020/05/28/python%20work/%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1%E7%89%88%E5%AD%A6%E5%91%98%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F/">面向对象版学员管理系统</a>
            </h1>
        </div>
        <div class="tag-article">
            
            <span class="label label-gal">
                <i class="fa fa-tags"></i>
                
                <a href="/tags/python/">python</a>
                
            </span>
            
            <span class="label label-gal">
                <i class="fa fa-calendar"></i> 2020-05-28
            </span>
            
        </div>
    </div>
    <!-- 小型设备详细文章 -->
    <div class="visible-xs">
        <center>
            <div class="title-article">
                <h4>
                    <a href="/2020/05/28/python%20work/%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1%E7%89%88%E5%AD%A6%E5%91%98%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F/">面向对象版学员管理系统</a>
                </h4>
            </div>
            <p>
                <i class="fa fa-calendar"></i> 2020-05-28
            </p>
            <p>
                
                <i class="fa fa-tags"></i>
                
                <a href="/tags/python/">python</a>
                
                
                
            </p>
        </center>
    </div>
    <div class="content-article">
        <h1 id="面向对象版学员管理系统"><a href="#面向对象版学员管理系统" class="headerlink" title="面向对象版学员管理系统"></a>面向对象版学员管理系统</h1><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># -*- coding: utf-8 -*-</span></span><br><span class="line"><span class="comment"># @Time     : 2020/5/27</span></span><br><span class="line"><span class="comment"># @Author   : esy</span></span><br><span class="line"></span><br><span class="line"><span class="string">&quot;&quot;&quot;</span></span><br><span class="line"><span class="string">## 3.1 student.py</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">需求：</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">- 学员信息包含：姓名、性别、手机号；</span></span><br><span class="line"><span class="string">- 添加`__str__`魔法方法，方便查看学员对象信息</span></span><br><span class="line"><span class="string">&quot;&quot;&quot;</span></span><br><span class="line"></span><br><span class="line"><span class="string">&quot;&quot;&quot;</span></span><br><span class="line"><span class="string">分析：</span></span><br><span class="line"><span class="string">1.生成学生这个类别</span></span><br><span class="line"><span class="string">2.这个类别中的属性有 姓名、性别、手机号</span></span><br><span class="line"><span class="string">3.可以用__str__这个来进行赋值</span></span><br><span class="line"><span class="string">&quot;&quot;&quot;</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 生成学生这个类别</span></span><br><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">student</span>(<span class="params"><span class="built_in">object</span></span>):</span></span><br><span class="line">    <span class="comment"># 初始化对象，设定对象带的属性，用__init__设置带类的对象的属性，self就是student</span></span><br><span class="line">    <span class="function"><span class="keyword">def</span> <span class="title">__init__</span>(<span class="params">self, name, gender, tel</span>):</span></span><br><span class="line">        <span class="comment"># self.name就是带的小属性，name即可定义参数</span></span><br><span class="line">        self.name = name</span><br><span class="line">        self.gender = gender</span><br><span class="line">        self.tel = tel</span><br><span class="line">    <span class="comment"># def __str__(self):</span></span><br><span class="line">    <span class="comment"># 当使用print输出对象的时候，默认打印对象的内存地址。</span></span><br><span class="line">    <span class="comment"># 如果类定义了`__str__`方法，那么就会打印从在这个方法中 return 的数据。</span></span><br><span class="line">    <span class="comment"># 便于直接打印出内部的文件信息</span></span><br><span class="line">    <span class="function"><span class="keyword">def</span> <span class="title">__str__</span>(<span class="params">self</span>):</span></span><br><span class="line">        <span class="comment"># 返回的是要打印的内容</span></span><br><span class="line">        <span class="keyword">return</span> <span class="string">f&quot;学生姓名：<span class="subst">&#123;self.name&#125;</span>, 性别：<span class="subst">&#123;self.gender&#125;</span>, 手机号：<span class="subst">&#123;self.tel&#125;</span>&quot;</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 重命名时不能命名为类的名字</span></span><br><span class="line"><span class="comment"># student1 = student(&#x27;zc&#x27;, &#x27;man&#x27;, &#x27;111&#x27;)</span></span><br><span class="line"><span class="comment"># print(student1)</span></span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h2 id="生成管理系统这个类别："><a href="#生成管理系统这个类别：" class="headerlink" title="生成管理系统这个类别："></a>生成管理系统这个类别：</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># -*- coding: utf-8 -*-</span></span><br><span class="line"><span class="comment"># @Time     : 2020/5/28</span></span><br><span class="line"><span class="comment"># @Author   : esy</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">from</span> student <span class="keyword">import</span> student</span><br><span class="line"></span><br><span class="line"><span class="string">&quot;&quot;&quot;</span></span><br><span class="line"><span class="string">##  ManagerSystem.py</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">需求：</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">- 存储数据的位置：文件(student.csv)</span></span><br><span class="line"><span class="string">  - 加载文件数据</span></span><br><span class="line"><span class="string">  - 修改数据后保存到文件</span></span><br><span class="line"><span class="string">- 存储数据的形式：列表存储学员对象</span></span><br><span class="line"><span class="string">- 系统功能</span></span><br><span class="line"><span class="string">  - 添加学员</span></span><br><span class="line"><span class="string">  - 删除学员</span></span><br><span class="line"><span class="string">  - 修改学员</span></span><br><span class="line"><span class="string">  - 查询学员信息</span></span><br><span class="line"><span class="string">  - 显示所有学员信息</span></span><br><span class="line"><span class="string">  - 保存学员信息</span></span><br><span class="line"><span class="string">  - 退出系统</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">&quot;&quot;&quot;</span></span><br><span class="line"></span><br><span class="line"><span class="string">&quot;&quot;&quot;</span></span><br><span class="line"><span class="string">需求：系统功能循环使用，用户输入不同的功能序号执行不同的功能。</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">- 步骤</span></span><br><span class="line"><span class="string">  - 定义程序入口函数</span></span><br><span class="line"><span class="string">    - 加载数据</span></span><br><span class="line"><span class="string">    - 显示功能菜单</span></span><br><span class="line"><span class="string">    - 用户输入功能序号</span></span><br><span class="line"><span class="string">    - 根据用户输入的功能序号执行不同的功能</span></span><br><span class="line"><span class="string">  - 定义系统功能函数，添加、删除学员等</span></span><br><span class="line"><span class="string">&quot;&quot;&quot;</span></span><br><span class="line"></span><br><span class="line"><span class="string">&quot;&quot;&quot;</span></span><br><span class="line"><span class="string">分析：</span></span><br><span class="line"><span class="string">1. 加载data文件</span></span><br><span class="line"><span class="string">需要对文件进行修改和保存</span></span><br><span class="line"><span class="string">2. 修改数据后保存到文件</span></span><br><span class="line"><span class="string">&quot;&quot;&quot;</span></span><br><span class="line"></span><br><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">MangerSystem</span>(<span class="params"><span class="built_in">object</span></span>):</span></span><br><span class="line">    <span class="function"><span class="keyword">def</span> <span class="title">__init__</span>(<span class="params">self</span>):</span></span><br><span class="line">        <span class="comment"># 列表存储学员对象</span></span><br><span class="line">        self.student_list = []</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">def</span> <span class="title">run</span>(<span class="params">self</span>):</span></span><br><span class="line">        <span class="comment"># 程序开始运行，进入界面</span></span><br><span class="line">        <span class="comment"># 加载student.data文件</span></span><br><span class="line">        self.load_student()</span><br><span class="line"></span><br><span class="line">        <span class="comment"># while True 语句中一定要有结束该循环的break语句，否则会一直循环下去的。</span></span><br><span class="line">        <span class="comment"># 这是一个死循环，所以每次循环后输入都要去显示页面</span></span><br><span class="line">        <span class="comment"># 采用while True循环语句：</span></span><br><span class="line">        <span class="comment"># 根据输入的功能序号进行判断，然后运行功能</span></span><br><span class="line">        <span class="keyword">while</span> <span class="literal">True</span>:</span><br><span class="line">            <span class="comment"># 显示界面的功能</span></span><br><span class="line">            self.show_menu()</span><br><span class="line">            <span class="comment"># 利用数字筛选系统的功能，供选择系统的功能，首先要确定你输入的数字是什么</span></span><br><span class="line">            <span class="comment"># 用int转换为整数形式，将这个功能赋值给菜单，然后用菜单里的内容进行比较，输入菜单的功能</span></span><br><span class="line">            menu_num = <span class="built_in">int</span>(<span class="built_in">input</span>(<span class="string">&#x27;请输入你需要的功能序号：&#x27;</span>))</span><br><span class="line"></span><br><span class="line">            <span class="keyword">if</span> menu_num == <span class="number">1</span>:</span><br><span class="line">                <span class="comment"># 1- 添加学员</span></span><br><span class="line">                self.add_student()</span><br><span class="line">            <span class="keyword">elif</span> menu_num == <span class="number">2</span>:</span><br><span class="line">                <span class="comment"># 2- 删除学员</span></span><br><span class="line">                self.del_student()</span><br><span class="line">            <span class="keyword">elif</span> menu_num == <span class="number">3</span>:</span><br><span class="line">                <span class="comment"># 3 - 修改学员</span></span><br><span class="line">                self.modify_student()</span><br><span class="line">            <span class="keyword">elif</span> menu_num == <span class="number">4</span>:</span><br><span class="line">                <span class="comment"># 4 - 查询学员信息</span></span><br><span class="line">                self.search_student()</span><br><span class="line">            <span class="keyword">elif</span> menu_num == <span class="number">5</span>:</span><br><span class="line">                <span class="comment"># 5 - 显示所有学员信息</span></span><br><span class="line">                self.show_student()</span><br><span class="line">            <span class="keyword">elif</span> menu_num == <span class="number">6</span>:</span><br><span class="line">                <span class="comment"># 6 - 保存学员信息</span></span><br><span class="line">                self.save_student()</span><br><span class="line">            <span class="keyword">elif</span> menu_num == <span class="number">7</span>:</span><br><span class="line">                <span class="comment"># 7 - 退出系统</span></span><br><span class="line">                <span class="comment"># 跳出循环即可</span></span><br><span class="line">                <span class="keyword">break</span></span><br><span class="line"></span><br><span class="line">    <span class="comment"># 显示菜单的功能，将对应序号表现出来，以供选择，静态的</span></span><br><span class="line">    <span class="comment"># 当方法中 **既不需要使用实例对象**(如实例对象，实例属性)，**也不需要使用类对象**</span></span><br><span class="line">    <span class="comment"># (如类属性、类方法、创建实例等)时，定义为静态方法</span></span><br><span class="line">    <span class="comment"># 用@staticmethod修饰</span></span><br><span class="line"><span class="meta">    @staticmethod</span></span><br><span class="line">    <span class="function"><span class="keyword">def</span> <span class="title">show_menu</span>():</span></span><br><span class="line">        print(<span class="string">f&#x27;请选择以下功能： &#x27;</span>)</span><br><span class="line">        print(<span class="string">f&#x27;1: 添加学员&#x27;</span>)</span><br><span class="line">        print(<span class="string">f&#x27;2: 删除学员&#x27;</span>)</span><br><span class="line">        print(<span class="string">f&#x27;3: 修改学员信息&#x27;</span>)</span><br><span class="line">        print(<span class="string">f&#x27;4: 查询学员信息&#x27;</span>)</span><br><span class="line">        print(<span class="string">f&#x27;5: 显示所有学员信息&#x27;</span>)</span><br><span class="line">        print(<span class="string">f&#x27;6: 保存学员信息&#x27;</span>)</span><br><span class="line">        print(<span class="string">f&#x27;7: 退出系统&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    <span class="comment"># 读取student中的数据</span></span><br><span class="line">    <span class="function"><span class="keyword">def</span> <span class="title">load_student</span>(<span class="params">self</span>):</span></span><br><span class="line">        <span class="keyword">try</span>:</span><br><span class="line">            f = <span class="built_in">open</span>(<span class="string">&#x27;student.data&#x27;</span>, <span class="string">&#x27;r&#x27;</span>)</span><br><span class="line">            print(<span class="string">f&#x27;成功打开文件&#x27;</span>)</span><br><span class="line">        <span class="keyword">except</span>:</span><br><span class="line">            f = <span class="built_in">open</span>(<span class="string">&#x27;student.data&#x27;</span>, <span class="string">&#x27;w&#x27;</span>)</span><br><span class="line">            print(<span class="string">f&#x27;没有该文件&#x27;</span>)</span><br><span class="line">        <span class="keyword">else</span>:</span><br><span class="line">            data = f.read()</span><br><span class="line">            data_list = <span class="built_in">eval</span>(data)</span><br><span class="line">            <span class="comment"># 将学生的数据放入学生的类别中，student.py,参数写入student的属性(&#x27;name&#x27;, &#x27;gender&#x27;, &#x27;tel&#x27;)，将其赋值，并保存为list形式</span></span><br><span class="line">            <span class="comment"># 需要与student.py文件结合起来,需要导入那个文件中的student模块，类别</span></span><br><span class="line">            self.student_list = [student(i[<span class="string">&#x27;name&#x27;</span>], i[<span class="string">&#x27;gender&#x27;</span>], i[<span class="string">&#x27;tel&#x27;</span>]) <span class="keyword">for</span> i <span class="keyword">in</span> data_list]</span><br><span class="line">        <span class="keyword">finally</span>:</span><br><span class="line">            f.close()</span><br><span class="line"></span><br><span class="line">    <span class="comment"># 1-添加学员</span></span><br><span class="line">    <span class="function"><span class="keyword">def</span> <span class="title">add_student</span>(<span class="params">self</span>):</span></span><br><span class="line">        <span class="comment"># 输入name gender tel</span></span><br><span class="line">        name = <span class="built_in">input</span>(<span class="string">&quot;请输入学员的姓名：&quot;</span>)</span><br><span class="line">        gender = <span class="built_in">input</span>(<span class="string">&quot;请输入学员的性别： &quot;</span>)</span><br><span class="line">        tel = <span class="built_in">input</span>(<span class="string">&quot;请输入学员的电话号码： &quot;</span>)</span><br><span class="line">        <span class="comment"># 将name gender tel放入student这个类别里面，作为一个字典，然后再叠加到student_list这个列表里面</span></span><br><span class="line">        student_in = student(name, gender, tel)</span><br><span class="line"></span><br><span class="line">        self.student_list.append(student_in)</span><br><span class="line">        <span class="comment"># 查看字典和列表</span></span><br><span class="line">        print(student_in)</span><br><span class="line">        print(self.student_list)</span><br><span class="line"></span><br><span class="line">    <span class="comment"># 2-删除学员</span></span><br><span class="line">    <span class="function"><span class="keyword">def</span> <span class="title">del_student</span>(<span class="params">self</span>):</span></span><br><span class="line">        <span class="comment"># 输入你想删除学员的名字</span></span><br><span class="line">        del_name = <span class="built_in">input</span>(<span class="string">&quot;请输入你想删除的学员的名字： &quot;</span>)</span><br><span class="line">        <span class="comment"># 查找这个学员的名字在哪,用循环遍历出这个学员的所在</span></span><br><span class="line">        <span class="comment"># 然后删除这个学员的name gender tel，即在list中直接移除这个字典</span></span><br><span class="line">        <span class="comment"># 遍历出的每个字典都是student_in = student(name, gender, tel)，所以这个字典中的名字即可为i.name</span></span><br><span class="line">        <span class="keyword">for</span> i <span class="keyword">in</span> self.student_list:</span><br><span class="line">            <span class="keyword">if</span> del_name == i.name:</span><br><span class="line">                self.student_list.remove(i)</span><br><span class="line">                <span class="keyword">break</span></span><br><span class="line">        <span class="keyword">else</span>:</span><br><span class="line">            <span class="comment"># 如果没有这个名字就输出这个</span></span><br><span class="line">            print(<span class="string">&#x27;没有这个学员&#x27;</span>)</span><br><span class="line">        <span class="comment"># 再打印出这个列表的值</span></span><br><span class="line">        print(self.student_list)</span><br><span class="line"></span><br><span class="line">    <span class="comment"># 3- 修改学员信息</span></span><br><span class="line">    <span class="function"><span class="keyword">def</span> <span class="title">modify_student</span>(<span class="params">self</span>):</span></span><br><span class="line">        <span class="comment"># 输入你想修改的学员的名字,进行查找,然后修改里面的name,gender,tel</span></span><br><span class="line">        modify_name = <span class="built_in">input</span>(<span class="string">&quot;请输入你想修改的学员的名字： &quot;</span>)</span><br><span class="line">        <span class="keyword">for</span> i <span class="keyword">in</span> self.student_list:</span><br><span class="line">            <span class="keyword">if</span> modify_name == i.name:</span><br><span class="line">                i.name = <span class="built_in">input</span>(<span class="string">&quot;姓名修改：&quot;</span>)</span><br><span class="line">                i.gender = <span class="built_in">input</span>(<span class="string">&quot;性别修改：&quot;</span>)</span><br><span class="line">                i.tel = <span class="built_in">input</span>(<span class="string">&quot;电话修改为：&quot;</span>)</span><br><span class="line">                print(<span class="string">f&#x27;学员信息修改完毕。 姓名为<span class="subst">&#123;i.name&#125;</span>, 性别为：<span class="subst">&#123;i.gender&#125;</span>, 电话为：<span class="subst">&#123;i.tel&#125;</span>&#x27;</span>)</span><br><span class="line">                <span class="keyword">break</span></span><br><span class="line">        <span class="keyword">else</span>:</span><br><span class="line">            <span class="comment"># 如果没有这个名字就输出这个</span></span><br><span class="line">            print(<span class="string">&#x27;没有这个学员&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    <span class="comment"># 4 - 查询学员信息</span></span><br><span class="line">    <span class="function"><span class="keyword">def</span> <span class="title">search_student</span>(<span class="params">self</span>):</span></span><br><span class="line">        <span class="comment"># 输入你想查询的学员的名字,进行查找</span></span><br><span class="line">        search_name = <span class="built_in">input</span>(<span class="string">&quot;请输入你想查找的的学员的名字： &quot;</span>)</span><br><span class="line">        <span class="keyword">for</span> i <span class="keyword">in</span> self.student_list:</span><br><span class="line">            <span class="keyword">if</span> search_name == i.name:</span><br><span class="line">                print(<span class="string">f&#x27;姓名：<span class="subst">&#123;i.name&#125;</span>, 性别：<span class="subst">&#123;i.gender&#125;</span>, 电话：<span class="subst">&#123;i.tel&#125;</span>&#x27;</span>)</span><br><span class="line">                <span class="keyword">break</span></span><br><span class="line">        <span class="keyword">else</span>:</span><br><span class="line">            <span class="comment"># 如果没有这个名字就输出这个</span></span><br><span class="line">            print(<span class="string">&#x27;没有这个学员&#x27;</span>)</span><br><span class="line"></span><br><span class="line">    <span class="comment"># 5- 显示所有学员信息</span></span><br><span class="line">    <span class="function"><span class="keyword">def</span> <span class="title">show_student</span>(<span class="params">self</span>):</span></span><br><span class="line">        <span class="comment"># 用表格的形式展示</span></span><br><span class="line">        <span class="comment"># 打印表头</span></span><br><span class="line">        print(<span class="string">f&#x27;姓名\t性别\t电话&#x27;</span>)</span><br><span class="line">        <span class="keyword">for</span> i <span class="keyword">in</span> self.student_list:</span><br><span class="line">            <span class="comment"># 打印出表格内容</span></span><br><span class="line">            print(<span class="string">f&#x27;<span class="subst">&#123;i.name&#125;</span>\t<span class="subst">&#123;i.gender&#125;</span>\t<span class="subst">&#123;i.tel&#125;</span>&#x27;</span>)</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    <span class="comment"># 6- 保存学员信息</span></span><br><span class="line">    <span class="comment"># 即将学员的信息写入student.data文件中</span></span><br><span class="line">    <span class="function"><span class="keyword">def</span> <span class="title">save_student</span>(<span class="params">self</span>):</span></span><br><span class="line">        f = <span class="built_in">open</span>(<span class="string">&#x27;student.data&#x27;</span>, <span class="string">&#x27;w&#x27;</span>)</span><br><span class="line">        <span class="comment"># 将student_list中的内容更改后写入程序</span></span><br><span class="line">        <span class="comment"># 写入的内容必须是字符串</span></span><br><span class="line">        <span class="comment"># 直接写入的列表将会是一个字符串形式，但是不会进行单排的分页，所以需要将它一个一个的展开</span></span><br><span class="line">        <span class="comment"># new_list = []</span></span><br><span class="line">        <span class="comment"># for i in self.student_list:</span></span><br><span class="line">        <span class="comment">#     new_list.append(i.__dict__)</span></span><br><span class="line">        new_list = [i.__dict__ <span class="keyword">for</span> i <span class="keyword">in</span> self.student_list]</span><br><span class="line">        f.write(<span class="built_in">str</span>(new_list))</span><br><span class="line"></span><br><span class="line">        f.close()</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 这个符号的意思</span></span><br><span class="line"><span class="comment"># __dict__?直接调用类别中的那列的字典</span></span><br><span class="line"><span class="comment"># 1. 定义类</span></span><br><span class="line"><span class="comment"># class A(object):</span></span><br><span class="line"><span class="comment">#     a = 0</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment">#     def __init__(self):</span></span><br><span class="line"><span class="comment">#         self.b = 1</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment"># # 2. 创建对象</span></span><br><span class="line"><span class="comment"># aa = A()</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment"># # 3. 调用__dict__</span></span><br><span class="line"><span class="comment"># print(A.__dict__)</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment"># print(aa.__dict__)</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="string">&quot;&quot;&quot;</span></span><br><span class="line"><span class="string">try:</span></span><br><span class="line"><span class="string">    # 用只读的形式打开文件</span></span><br><span class="line"><span class="string">    f = open(&#x27;student.data&#x27;, &#x27;r&#x27;)</span></span><br><span class="line"><span class="string">    print(f&#x27;文件夹中有该文件&#x27;)</span></span><br><span class="line"><span class="string">except:</span></span><br><span class="line"><span class="string">    # 如果发生了异常，则在文件夹中创建一个新的文件，用w写入文件</span></span><br><span class="line"><span class="string">    f = open(&#x27;student.data&#x27;, &#x27;w&#x27;)</span></span><br><span class="line"><span class="string">    print(f&#x27;创建一个新的文件&#x27;)</span></span><br><span class="line"><span class="string">else:</span></span><br><span class="line"><span class="string">    # 没有异常才执行的语句，try能够运行才执行的语句</span></span><br><span class="line"><span class="string">    # f.read()读取文件夹中的参数，内容</span></span><br><span class="line"><span class="string">    data = f.read()</span></span><br><span class="line"><span class="string">    # 查看data内的参数内容</span></span><br><span class="line"><span class="string">    print(type(data))</span></span><br><span class="line"><span class="string">    # &#x27;[&#123;&#x27;name&#x27;: &#x27;aaa&#x27;, &#x27;gender&#x27;: &#x27;nan&#x27;, &#x27;tel&#x27;: &#x27;11111111&#x27;&#125;]&#x27;</span></span><br><span class="line"><span class="string">    # data是字符串形式，去除[]列表外的&#x27;&#x27;,使用eval，转换为list</span></span><br><span class="line"><span class="string">    data_list = eval(data)</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    print(f&#x27;将字符串&#123;type(data)&#125;转换为列表&#123;type(data_list)&#125;:&#123;data_list&#125;&#x27;)</span></span><br><span class="line"><span class="string">    print(f&#x27;字典的key:&#123;data_list[0].keys()&#125;, 字典的values: &#123;data_list[0].values()&#125;&#x27;)</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">    name = data_list[0][&#x27;name&#x27;]</span></span><br><span class="line"><span class="string">    gender = data_list[0][&#x27;gender&#x27;]</span></span><br><span class="line"><span class="string">    tel = data_list[0][&#x27;tel&#x27;]</span></span><br><span class="line"><span class="string">finally:</span></span><br><span class="line"><span class="string">    # 不管成功与否，关闭文件夹</span></span><br><span class="line"><span class="string">    f.close()</span></span><br><span class="line"><span class="string">for i in data_list:</span></span><br><span class="line"><span class="string">    print(i)</span></span><br><span class="line"><span class="string">    print(1)</span></span><br><span class="line"><span class="string">    self.student_list = [Student(i[&#x27;name&#x27;], i[&#x27;gender&#x27;], i[&#x27;tel&#x27;]) for i in new_list]</span></span><br><span class="line"><span class="string">    生成一个字典i: dict, &#123;&#x27;name&#x27;: &#x27;aaa&#x27;, &#x27;gender&#x27;: &#x27;nan&#x27;, &#x27;tel&#x27;: &#x27;11111111&#x27;&#125;</span></span><br><span class="line"><span class="string">    i[&#x27;name&#x27;] = value</span></span><br><span class="line"><span class="string">    # 然后将其赋值到student的属性里面</span></span><br><span class="line"><span class="string">&quot;&quot;&quot;</span></span><br></pre></td></tr></table></figure>

<h2 id="生成一个主程序进行运行"><a href="#生成一个主程序进行运行" class="headerlink" title="生成一个主程序进行运行"></a>生成一个主程序进行运行</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># -*- coding: utf-8 -*-</span></span><br><span class="line"><span class="comment"># @Time     : 2020/5/28</span></span><br><span class="line"><span class="comment"># @Author   : esy</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 生成一个主程序进行运行</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">from</span> MangerSystem <span class="keyword">import</span> *</span><br><span class="line"><span class="comment"># 已经在MangerSystem进行了调用</span></span><br><span class="line"><span class="comment"># from student import *</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 2. 启动管理系统</span></span><br><span class="line"><span class="comment"># 保证是当前文件运行才启动管理系统：if --创建对象并调用run方法</span></span><br><span class="line"><span class="comment"># 每个python模块（python文件，也就是此处的 test.py 和 import_test.py）都包含内置的变量</span></span><br><span class="line"><span class="comment"># __name__，当该模块被直接执行的时候，__name__ 等于文件名（包含后缀 .py ）；</span></span><br><span class="line"><span class="comment"># 如果该模块 import 到其他模块中，则该模块的 __name__ 等于模块名称（不包含后缀.py）。</span></span><br><span class="line"><span class="comment"># 而 “__main__” 始终指当前执行模块的名称（包含后缀.py）。进而当模块被直接执行时，__name__ == &#x27;main&#x27; 结果为真。</span></span><br><span class="line"><span class="keyword">if</span> __name__ == <span class="string">&#x27;__main__&#x27;</span>:</span><br><span class="line">    student_manager = MangerSystem()</span><br><span class="line">    student_manager.run()</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h2 id="生成的界面："><a href="#生成的界面：" class="headerlink" title="生成的界面："></a>生成的界面：</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">成功打开文件</span><br><span class="line">请选择以下功能： </span><br><span class="line"><span class="number">1</span>: 添加学员</span><br><span class="line"><span class="number">2</span>: 删除学员</span><br><span class="line"><span class="number">3</span>: 修改学员信息</span><br><span class="line"><span class="number">4</span>: 查询学员信息</span><br><span class="line"><span class="number">5</span>: 显示所有学员信息 不能进行<span class="keyword">break</span>,要不然会导致添加后跳出循环，无法查找到</span><br><span class="line"><span class="number">6</span>: 保存学员信息</span><br><span class="line"><span class="number">7</span>: 退出系统</span><br><span class="line">请输入你需要的功能序号：</span><br></pre></td></tr></table></figure>

<p><img src="https://pic.wenwen.soso.com/p/20111224/20111224100129-971797133.jpg"></p>

    </div>
</article>


                </div>
                <aside class="col-md-4 gal-left" id="sidebar">
    <!-- 此为sidebar的搜索框, 非搜索结果页面 -->
<aside id="sidebar-search">
    <div class="search hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <form class="form-inline clearfix" id="search-form" method="get"
              action="/search/index.html">
            <input type="text" name="s" class="form-control" id="searchInput" placeholder="搜索文章~" autocomplete="off">
            <button class="btn btn-danger btn-gal" type="submit">
                <i class="fa fa-search"></i>
            </button>
        </form>
    </div>
</aside>
    <aside id="sidebar-author">
    <div class="panel panel-gal" data-aos="flip-right" data-aos-duration="3000">
        <div class="panel-heading" style="text-align: center">
            <i class="fa fa-quote-left"></i>
            esy
            <i class="fa fa-quote-right"></i>
        </div>
        <div class="author-panel text-center">
            <img src="/imgs/avatar.jpg" width="140" height="140"
                 alt="个人头像" class="author-image">
            <p class="author-description"><p>esy</p>
</p>
        </div>
    </div>
</aside>
    
    <aside id="sidebar-recent_comments">
    <div class="panel panel-gal recent hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <div class="panel-heading">
            <i class="fa fa-comments"></i>
            最新评论
            <i class="fa fa-times-circle panel-remove"></i>
            <i class="fa fa-chevron-circle-up panel-toggle"></i>
        </div>
        <ul class="list-group list-group-flush"></ul>
    </div>
</aside>
    
    <!-- 要配置好leancloud才能开启此小工具 -->
    
    
    <aside id="sidebar-recent_posts">
    <div class="panel panel-gal recent hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <div class="panel-heading">
            <i class="fa fa-refresh"></i>
            近期文章
            <i class="fa fa-times-circle panel-remove"></i>
            <i class="fa fa-chevron-circle-up panel-toggle"></i>
        </div>
        <ul class="list-group list-group-flush">
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/05/python%20work/%E6%9C%80%E5%B0%8F%E4%BA%8C%E4%B9%98%E6%B3%95/">最小二乘法</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/05/python%20work/%E7%BB%9F%E8%AE%A1%E5%AD%A6%E4%B9%A0-%E7%AC%AC%E4%B8%80%E7%AB%A0/">统计学习--第一章</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/04/python%20work/hello-world/">Hello World</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/03/python%20work/%E5%88%86%E7%B1%BB%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%AF%84%E4%BC%B0%E6%8C%87%E6%A0%87/">分类模型的评估指标</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/10/21/python%20work/10-21-%E7%88%AC%E8%99%AB%E5%9F%BA%E7%A1%80/">10-21 爬虫基础</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/CRF%E7%9A%84%E6%95%B4%E4%BD%93%E6%B5%81%E7%A8%8B%E7%BB%93%E6%9E%9C/">CRF的整体流程结果</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/nlp-crf%E6%A8%A1%E5%9E%8B/">nlp_crf模型</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%983/">数学建模问题3</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%982/">数学建模问题2</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%981/">数学建模问题1</a>
                </span>
            </li>
            
        </ul>
    </div>
</aside>
    
    
    <aside id="sidebar-rand_posts">
    <div class="panel panel-gal recent hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <div class="panel-heading">
            <i class="fa fa-refresh"></i>
            随机文章
            <i class="fa fa-times-circle panel-remove"></i>
            <i class="fa fa-chevron-circle-up panel-toggle"></i>
        </div>
        <ul class="list-group list-group-flush">
            
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/03/python%20work/DATA%E6%95%B0%E6%8D%AE%E7%BB%98%E5%88%B6/">DATA数据绘制</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/08/08/python%20work/UI%E7%95%8C%E9%9D%A2%E7%BE%8E%E5%8C%96/">UI界面美化</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/08/08/python%20work/gensim%E4%B8%AD%E7%9A%84tfidf/">gensim中的tfidf</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/07/23/python%20work/gui%E7%95%8C%E9%9D%A2%E6%9A%82%E5%AE%9A%E7%89%88%E5%92%8C%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98/">gui界面暂定版和遇到的问题</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/nlp-crf%E6%A8%A1%E5%9E%8B/">nlp_crf模型</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2019/12/10/python%20work/%E5%8D%87%E7%BA%A7conda/">升级conda</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2019/12/26/python%20work/%E5%8E%BB%E8%B6%8B%E5%8A%BF%E6%B3%A2%E5%8A%A8%E5%88%86%E6%9E%90DFA/">去趋势波动分析DFA</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/08/19/python%20work/%E5%AF%B9UCDDB%E6%95%B0%E6%8D%AE%E5%BA%93%E8%BF%9B%E8%A1%8C%E7%89%B9%E5%BE%81%E6%8F%90%E5%8F%96/">对UCDDB数据库进行特征提取</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/22/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E5%92%8C%E5%88%86%E6%9E%90/">数学建模和分析</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/06/08/python%20work/HRV%E7%9A%8430s%E7%89%B9%E5%BE%81%E6%8F%90%E5%8F%96/">HRV的30s特征提取</a>
                </span>
            </li>
            
        </ul>
    </div>
</aside>
    
    
    <aside id="gal-sets">
        <div class="panel panel-gal hidden-xs" data-aos="fade-up" data-aos-duration="2000">
            <ul class="nav nav-pills pills-gal">

                
                <li>
                    <a href="/2020/05/28/python%20work/%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1%E7%89%88%E5%AD%A6%E5%91%98%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F/index.html#sidebar-tags" data-toggle="tab" id="tags-tab">热门标签</a>
                </li>
                
                
                <li>
                    <a href="/2020/05/28/python%20work/%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1%E7%89%88%E5%AD%A6%E5%91%98%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F/index.html#sidebar-friend-links" data-toggle="tab" id="friend-links-tab">友情链接</a>
                </li>
                
                
                <li>
                    <a href="/2020/05/28/python%20work/%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1%E7%89%88%E5%AD%A6%E5%91%98%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F/index.html#sidebar-links" data-toggle="tab" id="links-tab">个人链接</a>
                </li>
                
            </ul>
            <div class="tab-content">
                
                <div class="cloud-tags tab-pane nav bs-sidenav fade" id="sidebar-tags">
    
    <a href="/tags/py-study/" style="font-size: 18.640215317438198px;" class="tag-cloud-link">py_study</a>
    
    <a href="/tags/nlp/" style="font-size: 19.044179017230523px;" class="tag-cloud-link">nlp</a>
    
    <a href="/tags/Graduation-work/" style="font-size: 19.09511551537785px;" class="tag-cloud-link">Graduation work</a>
    
    <a href="/tags/work/" style="font-size: 19.952578510149035px;" class="tag-cloud-link">work</a>
    
    <a href="/tags/hexo/" style="font-size: 11.624111230239997px;" class="tag-cloud-link">hexo</a>
    
    <a href="/tags/%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" style="font-size: 18.8062071789774px;" class="tag-cloud-link">-个人博客搭建</a>
    
    <a href="/tags/malab-%E6%AF%95%E4%B8%9A/" style="font-size: 12.662615943477673px;" class="tag-cloud-link">-malab -毕业</a>
    
    <a href="/tags/python-%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/" style="font-size: 16.422202414055704px;" class="tag-cloud-link">-python -人工智能</a>
    
    <a href="/tags/python/" style="font-size: 18.232159673874236px;" class="tag-cloud-link">python</a>
    
    <a href="/tags/python/" style="font-size: 11.706682899750172px;" class="tag-cloud-link">-python</a>
    
    <a href="/tags/mathematical-modeling/" style="font-size: 13.173994037679142px;" class="tag-cloud-link">mathematical modeling</a>
    
    <a href="/tags/statistical-learning/" style="font-size: 9.279436913631066px;" class="tag-cloud-link">statistical learning</a>
    
</div>
                
                
                <div class="friend-links tab-pane nav bs-sidenav fade" id="sidebar-friend-links">
    
    <li>
        <a href="http://kdays.net/days/" target="_blank">KDays Forum</a>
    </li>
    
    <li>
        <a href="http://www.gal123.com/" target="_blank">绅士导航♂</a>
    </li>
    
    <li>
        <a href="http://www.moe123.com/" target="_blank">萌导航</a>
    </li>
    
</div>
                
                
                <div class="links tab-pane nav bs-sidenav fade" id="sidebar-links">
    
    <li>
        <a href="https://github.com/ZEROKISEKI/" target="_blank">Github</a>
    </li>
    
    <li>
        <a href="https://coding.net/u/SORA1" target="_blank">Coding</a>
    </li>
    
    <li>
        <a href="https://www.zhihu.com/people/aonosora/activities" target="_blank">知乎</a>
    </li>
    
</div>
                
            </div>
        </div>
    </aside>
    
</aside>
            </div>
        </div>
    </div>
    <footer id="gal-footer">
    <div class="container">
        Copyright © 2018 esy Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>.&nbsp;Theme by <a href="https://github.com/ZEROKISEKI" target="_blank">AONOSORA</a>
    </div>
</footer>

<!-- 回到顶端 -->
<div id="gal-gotop">
    <i class="fa fa-angle-up"></i>
</div>
</body>

<script src="/js/activate-power-mode.js"></script>

<script>

    // 配置highslide
	hs.graphicsDir = '/js/highslide/graphics/'
    hs.outlineType = "rounded-white";
    hs.dimmingOpacity = 0.8;
    hs.outlineWhileAnimating = true;
    hs.showCredits = false;
    hs.captionEval = "this.thumb.alt";
    hs.numberPosition = "caption";
    hs.align = "center";
    hs.transitions = ["expand", "crossfade"];
    hs.lang.number = '共%2张图, 当前是第%1张';
    hs.addSlideshow({
      interval: 5000,
      repeat: true,
      useControls: true,
      fixedControls: "fit",
      overlayOptions: {
        opacity: 0.75,
        position: "bottom center",
        hideOnMouseOut: true
      }
    })

    // 初始化aos
    AOS.init({
      duration: 1000,
      delay: 0,
      easing: 'ease-out-back'
    });

</script>
<script>
	POWERMODE.colorful = 'true';    // make power mode colorful
	POWERMODE.shake = 'true';       // turn off shake
	// TODO 这里根据具体情况修改
	document.body.addEventListener('input', POWERMODE);
</script>
<script>
    window.slideConfig = {
      prefix: '/imgs/slide/background',
      ext: 'jpg',
      maxCount: '6'
    }
</script>

<script src="/js/hs.js"></script>
<script src="/js/blog.js"></script>



<script src="/js/oni.js"></script>




</html>